<template>
    <div class="wx-time">{{time | formatTime}}</div>
</template>

<script>
import Moment from 'moment'
import PropsMixin from '../mixins'
export default {
  mixins: [PropsMixin],
  filters:{
    formatTime(val){
      const day = Moment(val).day()
      const handle =  new Array("天", "一", "二", "三", "四", "五", "六");
      const str =  Moment(val).format('HH:mm')
      return `星期${handle[day]} ${str}`
    }
  }
}
</script>

<style lang="scss" scoped>
.wx-time{
    text-align: center;
}
</style>